home *** CD-ROM | disk | FTP | other *** search
/ CD Concept 6 / CD Concept 06.iso / mac / UTILITAIRE / Little Smalltalk v3.1.4 / C Source / Headers / macio.h < prev    next >
Text File  |  1994-08-21  |  1KB  |  44 lines

  1.  
  2. #include "LStResources.h"
  3.  
  4. #ifdef FILE
  5. #undef FILE
  6. #endif
  7.  
  8. #define FILE    _file
  9.  
  10. #define macFileTypeToSt(mft, sft)    \
  11.     if (mft == kTextType)            \
  12.         sft = 1;                    \
  13.     else if (mft == kSysImageType)    \
  14.         sft = 2;                    \
  15.     else                            \
  16.         sft = 0;                    \
  17.  
  18. #define stFileTypeToMac(sft, mft)    \
  19.     if (sft == 1)                    \
  20.         mft = kTextType;            \
  21.     else if (sft == 2)                \
  22.         mft = kSysImageType;         \
  23.     else                             \
  24.         mft = 0L;                    \
  25.  
  26. typedef struct {
  27.     short    openMode;
  28.     short    fileRef;
  29. } _file;
  30.  
  31. void         getPathName            (short volRef, long dirID, char *fullPath);
  32. void        getPathNameFromWD    (long dirID, char *fullPath);
  33. char         *mac_fgets         (char *buf, short n, FILE *fd);
  34. int         mac_fputs         (char *str, FILE *fd);
  35. static long fr                 (short fnum, char *p, long s);
  36. void         imageRead         (short fnum);
  37. static void    fw                (short fnum, char *p, long s);
  38. void         imageWrite        (short fnum);
  39. FILE         *getFilePointer (short fileNum);
  40. OSErr         createFile         (Str255 *fname, short ft);
  41. OSErr        openFile        (FILE *fd, char *fname, char *openParms, short ftype);
  42. void        closeFile         (FILE *fd, char *fname);
  43. object         ioPrimitive        (int number, object *arguments);
  44.